{% extends "blog_base.html" %}
{% load comments %}

{% block title %} blog list {% endblock %}

{% block article %}
<article class='content-main'>
    {% for blog in blogs %}     
        <h4><a href="{% url detailblog blog.id %}">{{ blog.caption }}</a></h4>
        <p class="muted">  
            {% for tag in blog.tags.all %}
                <i class="icon-tag"></i>  <small>{{ tag }}</small>
            {% endfor %}
        </p>  
        {% load markup %}
        <div>{{ blog.content|markdown:'codehilite' }} </div> 

        <div class="row-fluid">
            <div class="span3">
                <p class="muted"><i class="icon-time"></i><small> {{ blog.publish_time }}</small></p>       
            </div>
            <div class="span2 offset7">
                <a href="{% url delblog blog.id %}" title="delete"><i class="icon-trash"></i></a>
                <a href="{% url updateblog blog.id %}" title="edit"><i class="icon-edit"></i></a>
                {% get_comment_count for blog as comment_count %}
                <a href="{% url detailblog blog.id %}#cmt" title="comment"><i class=" icon-comment"></i>{{ comment_count }}</a>
            </div>
        </div>            
    <hr>         
    {% endfor %} 
</article>  
{% endblock %}

{% block aside %}
    {% block twitter %}
        <div id="weibo" class="well">
            {% for weibo in weibos %}
                <p class="text-info">{{ weibo }}</p>                
                <p class="text-success"><small>{{ weibo.publish_time }}</small></p>
                <hr class="soften">
            {% endfor %}
        </div>
    {% endblock %}
    {% block tags %}
        <div class="well">
            {% for tag in tags %}
            <span class="label"><a href="{% url filtrblog tag.id %}">{{ tag }}</a></span>
            {% endfor %}
        </div>
    {% endblock %}
{% endblock %}